// JavaScript Document
function loadXMLDoc(filename) {
	var xmlDoc;
	//Internet Explorer
	try {
  		xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  	}
	catch(e) {
		//Firefox, Mozilla, Opera, etc.
	  	try {
    		xmlDoc=document.implementation.createDocument("","",null);
    	}
  		catch(e) {alert(e.message)}
	}
	try {
		xmlDoc.async=false;
		xmlDoc.load(filename);
		//document.write("xmlDoc is loaded, ready for use");
  	}
	catch(e) {alert(e.message)}
	
	return xmlDoc;
}

function nodeValue(xmlDoc, nodename) {
	return xmlDoc.getElementsByTagName(nodename)[0].childNodes[0].nodeValue;
}